<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">

<h:head>
	<title>Personalize Your Package</title>
</h:head>


<body>
	<h:form>
		<p:menubar>
          	<p:menuitem value="Index" icon="ui-icon-refresh" url="index.xhtml" />
            
            <p:menuitem value="My Bookings!" icon="ui-icon-contact" url="userBookings.xhtml"/>  
            
            <p:menuitem value="Last Offers!" icon="ui-icon-search" url="packages.xhtml" />            
       
        <f:facet name="options">  
            <p:commandButton type="submit" ajax="false" action = "#{logoutBean.logout()}" value="Logout" icon="ui-icon-extlink" />  
        </f:facet>
       
       </p:menubar>
        </h:form>
<p:panel>
	<h:link outcome = "residences" value = "Change Residence!"/>
</p:panel>
<p:panel>
	<h:link outcome = "transports" value = "Change Transport!"/>
</p:panel>
<p:panel>
	<h:link outcome = "excursions" value = "Change Excursion!"/>
</p:panel>
	
	
	
	<h:form>
		<p:commandButton 
		disabled="#{(bookingBean.packageOnEdit.excursion!=bookingBean.packageSelected.excursion)
				|| (bookingBean.packageOnEdit.residence!=bookingBean.packageSelected.residence)
				|| (bookingBean.packageOnEdit.departureTransport!=bookingBean.packageSelected.departureTransport)
				|| (bookingBean.packageOnEdit.returnTransport!=bookingBean.packageSelected.returnTransport)
				|| !(bookingBean.c.isComplete(bookingBean.packageSelected))
				}"
		
		value="Book Package!"  
		action="#{bookingBean.book()}" 
		type="submit" ajax="false"/>
		
		
		<p:commandButton 
		disabled="#{!((bookingBean.packageOnEdit.excursion!=bookingBean.packageSelected.excursion)
				|| (bookingBean.packageOnEdit.residence!=bookingBean.packageSelected.residence)
				|| (bookingBean.packageOnEdit.departureTransport!=bookingBean.packageSelected.departureTransport)
				|| (bookingBean.packageOnEdit.returnTransport!=bookingBean.packageSelected.returnTransport))
				|| !(bookingBean.c.isComplete(bookingBean.packageOnEdit))
				}" 
		value="Book Your Personalized Package!"  
		action="#{bookingBean.bookPersonalized()}" 
		type="submit" ajax="false" />
		
	
	
	<p:panel header="General Details">
	        <h:panelGrid id="genGrid" columns="2" >
	        
	        <h:outputLabel>Price:</h:outputLabel>
	        <h:outputText value="#{bookingBean.packageOnEdit.price}"/>
	
					
		</h:panelGrid>
	</p:panel>	
</h:form>


		<p:panel header="Residence Details">
	        <h:panelGrid id="resGrid" columns="2" >   
	   
				<h:outputLabel>Available*:</h:outputLabel>
				<p:selectBooleanCheckbox value="#{bookingBean.packageOnEdit.residence.available}" disabled="true" />
			
				<h:outputLabel>Disponibility*:</h:outputLabel>
				<h:outputText value="#{bookingBean.packageOnEdit.residence.disponibility}" />
	            
	
				<h:outputLabel>Price*:</h:outputLabel>
				<h:outputText value="#{bookingBean.packageOnEdit.residence.price}" />
			
				
			
				<h:outputLabel>Residence Type*:</h:outputLabel>
				<h:outputText value="#{bookingBean.packageOnEdit.residence.type}" />  
				
				
				
				<h:outputLabel>Name*:</h:outputLabel>
				<h:outputText value="#{bookingBean.packageOnEdit.residence.residenceName}" /> 
				
				<h:outputLabel>City*:</h:outputLabel>
				<h:outputText value="#{bookingBean.packageOnEdit.residence.city}" /> 
				
				<h:outputLabel>Country*:</h:outputLabel>
				<h:outputText value="#{bookingBean.packageOnEdit.residence.country}" />
				
	
				<h:outputLabel>Address*:</h:outputLabel>
				<h:outputText value="#{bookingBean.packageOnEdit.residence.address}" />
		
				<h:outputLabel>From*:</h:outputLabel>
				<p:calendar value="#{bookingBean.packageOnEdit.residence.fromDate}" disabled="true" />
				
		
				<h:outputLabel>To*:</h:outputLabel>
				<p:calendar value="#{booking.packageOnEdit.residence.toDate}" disabled="true"/>
				
		
		
				<h:outputLabel >Site:</h:outputLabel>
				<h:outputText value="#{bookingBean.packageOnEdit.residence.site}"/> 
		
	
				<h:outputLabel>Phone:</h:outputLabel>
				<h:outputText value="#{bookingBean.packageOnEdit.residence.phoneNumber}"/>
		
	
				<h:outputLabel>Rooms*:</h:outputLabel>
				<h:outputText value="#{bookingBean.packageOnEdit.residence.rooms}"/> 
		
				<h:outputLabel>Beds*:</h:outputLabel>
				<h:outputText value="#{bookingBean.packageOnEdit.residence.rooms}"/>
			
				<h:outputLabel>Stars:</h:outputLabel>
				<p:rating value="#{bookingBean.packageOnEdit.residence.stars}" readonly="true"/>  
	  
	   
	        </h:panelGrid> 
	     </p:panel> 


		<p:panel header=" Departure Transport Details">
	        <h:panelGrid id="depTransGrid" columns="2" >   
	   
								
					<h:outputLabel>Available*:</h:outputLabel>
					<p:selectBooleanCheckbox 
					value="#{bookingBean.packageOnEdit.departureTransport.available}" disabled="true"/>
					
	
					<h:outputLabel>Disponibility*:</h:outputLabel>
					<h:outputText value="#{bookingBean.packageOnEdit.departureTransport.disponibility}" />
	
					<h:outputLabel>Price*:</h:outputLabel>
					<h:outputText value="#{bookingBean.packageOnEdit.departureTransport.price}"/>
					

					<h:outputLabel>Transport Type*:</h:outputLabel>
					<h:outputText value="#{bookingBean.packageOnEdit.departureTransport.type}" />
				
		
					<h:outputLabel>Number of Passengers*:</h:outputLabel>
					<h:outputText value="#{bookingBean.packageOnEdit.departureTransport.passengers}" />

					<h:outputLabel>Class*:</h:outputLabel>
					<h:outputText value="#{bookingBean.packageOnEdit.departureTransport.classNumber}" />
	
					<h:outputLabel>From (Place)*:</h:outputLabel>
					<h:outputText value="#{bookingBean.packageOnEdit.departureTransport.fromPlace}" />
	
					<h:outputLabel>To (Place)*:</h:outputLabel>
					<h:outputText value="#{bookingBean.packageOnEdit.departureTransport.toPlace}" />
	
					<h:outputLabel>Departure Date*:</h:outputLabel>
					<p:calendar value="#{bookingBean.packageOnEdit.departureTransport.departureDate}" disabled="true"  />
				
	
					<h:outputLabel>Departure Time*:</h:outputLabel>
					<p:calendar value="#{bookingBean.packageOnEdit.departureTransport.departureTime}" disabled="true" pattern="HH:mm" timeOnly="true" />					
					
					<h:outputLabel>Departure Company:</h:outputLabel>
					<h:outputText value="#{bookingBean.packageOnEdit.departureTransport.company}" />
					
					<h:outputLabel>Flight ID:</h:outputLabel>
					<h:outputText  value="#{bookingBean.packageOnEdit.departureTransport.flightId}" />
				
	        </h:panelGrid> 
	     </p:panel> 
	     

		<p:panel header="Return Transport Details">
	        <h:panelGrid id="retTransGrid" columns="2" >   
	   
								
					<h:outputLabel>Available*:</h:outputLabel>
					<p:selectBooleanCheckbox  
					value="#{bookingBean.packageOnEdit.returnTransport.available}" disabled="true"/>
					
	
					<h:outputLabel>Disponibility*:</h:outputLabel>
					<h:outputText value="#{bookingBean.packageOnEdit.returnTransport.disponibility}" />
	
					<h:outputLabel>Price*:</h:outputLabel>
					<h:outputText value="#{bookingBean.packageOnEdit.returnTransport.price}" />
					

					<h:outputLabel>Transport Type*:</h:outputLabel>
					<h:outputText value="#{bookingBean.packageOnEdit.returnTransport.type}" />
				
		
					<h:outputLabel>Number of Passengers*:</h:outputLabel>
					<h:outputText value="#{bookingBean.packageOnEdit.returnTransport.passengers}" />

					<h:outputLabel>Class*:</h:outputLabel>
					<h:outputText id="classNumber" value="#{bookingBean.packageOnEdit.returnTransport.classNumber}"/>
	
					<h:outputLabel>From (Place)*:</h:outputLabel>
					<h:outputText value="#{bookingBean.packageOnEdit.returnTransport.fromPlace}" />
	
					<h:outputLabel>To (Place)*:</h:outputLabel>
					<h:outputText  value="#{bookingBean.packageOnEdit.returnTransport.toPlace}" />
	
					<h:outputLabel>Departure Date*:</h:outputLabel>
					<p:calendar value="#{bookingBean.packageOnEdit.returnTransport.departureDate}" disabled="true"  id="departureDate"/>
				
	
					<h:outputLabel>Departure Time*:</h:outputLabel>
					<p:calendar value="#{bookingBean.packageOnEdit.returnTransport.departureTime}" disabled="true"  pattern="HH:mm" timeOnly="true" />					
					
					<h:outputLabel>Departure Company:</h:outputLabel>
					<h:outputText value="#{bookingBean.packageOnEdit.returnTransport.company}" />
					
					<h:outputLabel>Flight ID:</h:outputLabel>
					<h:outputText value="#{bookingBean.packageOnEdit.returnTransport.flightId}" />
				
	        </h:panelGrid> 
	     </p:panel> 

	     

		<p:panel header=" Excursion Details">
	        <h:panelGrid id="excGrid" columns="2" > 
	          
					<h:outputLabel>Available*:</h:outputLabel>
					<p:selectBooleanCheckbox value="#{bookingBean.packageOnEdit.excursion.available}" disabled="true" />
					
				
					<h:outputLabel>Disponibility*:</h:outputLabel>
					<h:outputText value="#{bookingBean.packageOnEdit.excursion.disponibility}"/>
			
					<h:outputLabel>Price*:</h:outputLabel>
					<h:outputText value="#{bookingBean.packageOnEdit.excursion.price}"/>
			
					<h:outputLabel>Type*:</h:outputLabel>
					<h:outputText value="#{bookingBean.packageOnEdit.excursion.type}" />
			
					<h:outputLabel>Description*:</h:outputLabel>
					<h:outputText value="#{bookingBean.packageOnEdit.excursion.description}" rows="6" cols="33" />
			
					<h:outputLabel >Date*:</h:outputLabel>
					<p:calendar value="#{bookingBean.packageOnEdit.excursion.date}"  disabled="true"/>
		
					<h:outputLabel>Start Time*:</h:outputLabel>
					<p:calendar value="#{bookingBean.packageOnEdit.excursion.startTime}"  pattern="HH:mm" timeOnly="true" disabled="true"/>
		
					<h:outputLabel>End Time*:</h:outputLabel>
					<p:calendar value="#{bookingBean.packageOnEdit.excursion.endTime}"  pattern="HH:mm" timeOnly="true" disabled="true"/>
								
					
	        </h:panelGrid> 
	     </p:panel> 
	
</body>




</html>